<?php

use yii\db\Migration;
use yii\db\Schema;

/**
 * Class m180321_105406_ALERT_FIELD_ROOMUSE
 */
class m180321_105406_ALERT_FIELD_ROOMUSE extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->alterColumn('{{room_use}}', 'room_id', Schema::TYPE_INTEGER. "(11) NOT NULL COMMENT '舱房编号' ");
        $this->alterColumn('{{room_use}}', 'num', Schema::TYPE_INTEGER. "(11) NULL COMMENT '房间人数' ");
        $this->alterColumn('{{customer}}', 'card', Schema::TYPE_STRING. "(64) null COMMENT '身份证号码' ");
        $this->alterColumn('{{customer}}', 'group', Schema::TYPE_STRING. "(64) null COMMENT '团号' ");
        $this->alterColumn('{{customer}}', 'supply', Schema::TYPE_STRING. "(64) null COMMENT '体系' ");
        $this->alterColumn('{{customer}}', 'rank', Schema::TYPE_STRING. "(64) null COMMENT '职级' "); 
        $this->alterColumn('{{customer}}', 'trip', Schema::TYPE_STRING. "(64) null COMMENT '岸上游览路线' ");
        $this->alterColumn('{{customer}}', 'size', Schema::TYPE_STRING. "(64) null COMMENT '皮肤衣尺寸' ");   
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        echo "m180321_105406_ALERT_FIELD_ROOMUSE cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m180321_105406_ALERT_FIELD_ROOMUSE cannot be reverted.\n";

        return false;
    }
    */
}
